package com.vcc.data.entity;


import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import com.vcc.data.base.entity.BaseEntity;
import lombok.*;

import java.io.Serializable;
import java.math.BigDecimal;

@EqualsAndHashCode(callSuper = true)
@Data
@Setter
@Getter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(value = "vcc_otp", comment = "验证码表")
public class Otp extends BaseEntity implements Serializable {

    /**
     * 当渠道无法锁定卡时为空
     */
    @Column(comment = "用户Id", value = "user_id")
    private Long userId; // 用户ID


    @Column(comment = "验证码", value = "code")
    private String code; // 验证码内容


    @Column(comment = "验证码类型", value = "type")
    private String type; // 验证码类型，例如：

    /**
     * 当渠道推送信息无法锁定卡时为空
     */
    @Column(comment = "关联卡", value = "user_card_id")
    private Long userCardId;

    /**
     * 当渠道推送信息无法锁定卡类型时为空
     */
    @Column(comment = "关联卡类型", value = "card_type_id")
    private Long cardTypeId;

    @Column(comment = "持卡人Id", value = "cardholder_id")
    private Long cardholderId;

    @Column(comment = "币种", value = "currency")
    private String currency;

    @Column(comment = "金额", value = "amount")
    private BigDecimal amount; // 金额

    @Column(comment = "卡号", value = "card_number")
    private String cardNumber;

    @Column(comment = "卡号后四位", value = "last_four_card_number")
    private String lastFourCardNumber;

    @Column(comment = "商户名称", value = "merchant_name")
    private String merchantName;

    @Column(comment = "推送源文件", value = "source_info")
    private String sourceInfo;
}
